﻿namespace CardPlay.Model.GameModel.Actions
{
    public class ResetDealCountAction : GameAction
    {
        private int _oldCount;

        public ResetDealCountAction(CardGame cardGame) : base(cardGame, PartLocation.Empty)
        {
        }

        protected override void OnExecute()
        {
            _oldCount = CardGame.TotalDeals;
            CardGame.TotalDeals = 0;
        }

        protected override void OnReverse()
        {
            CardGame.TotalDeals = _oldCount;
        }
    }
}